package function

object Map_Test {
  def main(args: Array[String]): Unit = {
    val map=Map("a"->1,"b"->2,"c"->3)
    println(map)
    println(map.get("a"))
    println(map.get("a").getOrElse("a",2))
    println(map.getOrElse("a",3))
    map.foreach(println)
    map.foreach(e=>{
      val str: String = e._1+"->"+e._2
      println(str)
    })
    map.keys.foreach(println)
    map.values.foreach(println)
    println(map)

  }
}
